﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SMS.DAL;
using SMS.DAL.Providers;

namespace SMS.Business
{
    public class StockItemsBussiness : BusinessBase<StockItem,StockItemsSearchCriteria>
    {
        StockItemsProvider stockItemProvider;
        public StockItemsBussiness()
        {
            stockItemProvider = new StockItemsProvider();
        }
        public override bool Insert(StockItem item)
        {
            throw new NotImplementedException();
        }

        public override bool Update(StockItem updatedItem)
        {
            stockItemProvider.Update(updatedItem);
            return true;
        }

        public override bool Delete(int id)
        {
            throw new NotImplementedException();
        }

        public override StockItem GetByID(int id)
        {
            return stockItemProvider.GetByID(id);
        }

        public override List<StockItem> Search(StockItemsSearchCriteria SearchCriteria)
        {
            throw new NotImplementedException();
        }

        public StockItem GetByItemIDAndStockID(StockItemsSearchCriteria SearchCriteria)
        {
            return stockItemProvider.GetByItemIDAndStockID(SearchCriteria);
        }

        public List<StockItem> GetByStocks(List<Stock> stocks,int ItemID)
        {
            return stockItemProvider.GetByStocks(stocks,ItemID);
        }
    }
}
